package com.example.pestcontrol.myadapter;

import java.util.Collection;

import org.kymjs.kjframe.KJBitmap;
import org.kymjs.kjframe.widget.AdapterHolder;
import org.kymjs.kjframe.widget.KJAdapter;

import android.widget.AbsListView;

import com.example.pestcontrol.R;
import com.example.pestcontrol.constant.Constant;
import com.example.pestcontrol.entity.ExpertsDiseaseInfo;

public class ShowExpertsDiseaseInfoAdapter extends
		KJAdapter<ExpertsDiseaseInfo> {

	KJBitmap kjb = new KJBitmap();

	public ShowExpertsDiseaseInfoAdapter(AbsListView view,
			Collection<ExpertsDiseaseInfo> mDatas, int itemLayoutId) {
		super(view, mDatas, itemLayoutId);
	}

	@Override
	public void convert(AdapterHolder arg0, ExpertsDiseaseInfo arg1,
			boolean arg2) {
		arg0.setText(R.id.show_e_disease_name, arg1.getE_disease_name());

		kjb.display(arg0.getView(R.id.show_e_disease_image), Constant.url
				+ arg1.getE_disease_image());
	}

}
